package com.wenli.lt.service.impl;

import com.wenli.lt.entity.Commentlist;
import com.wenli.lt.mapper.CommentlistMapper;
import com.wenli.lt.service.ICommentlistService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lt
 * @since 2021-03-23
 */
@Service
public class CommentlistServiceImpl extends ServiceImpl<CommentlistMapper, Commentlist> implements ICommentlistService {

    @Autowired
    CommentlistMapper commentlistMapper;
    @Override
    public Boolean AddCommentlist(Commentlist commentlist) {
        commentlist.setCommentId(UUID.randomUUID().toString().replace("-",""));
        int temp = commentlistMapper.insertCommentList(commentlist);
        return 1 == temp;
    }
}
